package com.yh.csx.bsf.flow.core.base;

/**
 * @author: chejiangyi
 * @version: 2019-10-24 15:48
 **/
public class FlowException extends RuntimeException {
    public FlowException(String message,Exception exp){
        super(message,exp);
    }
    public FlowException(String message){
        super(message);
    }

    public String getDetailMessage(){
        Throwable e = this;
        StringBuilder sb = new StringBuilder();
        while (e!=null){
            sb.append(e.getMessage());
            e=e.getCause();
            if(e!=null){
                sb.append("->");
            }
        }
        return sb.toString();
    }
}
